package com.ljcalc.business.components;


	public class LongAndCounter{
		long l=0;
		int counter = 1;
		
		public LongAndCounter(long l){
			this.l = l;
		}
		
		public void increment(){
			counter++;
		}
		
		public long getLong(){
			return l;
		}

		public boolean equals(Object obj) {
			if(obj instanceof Long){
				return this.l == ((Long)obj).longValue();
			}else if(obj instanceof LongAndCounter){
				return l== ((LongAndCounter)obj).getLong(); 
			}
			return false;
		}

		public int getCounter() {
			// TODO Auto-generated method stub
			return this.counter;
		}
		
		@Override
		public String toString() {
			// TODO Auto-generated method stub
			return l+":"+counter+",";
		}
	}